<?php

namespace app\api\controller;

use app\common\controller\Api;

/**
 * 首页接口
 */
class Index extends Api
{
    protected $noNeedLogin = ['*'];
    protected $noNeedRight = ['*'];

    /**
     * 首页
     *
     */
    public function index()
    {
        $this->success('请求成功');
    }

    /**
     * 首页分享配置
     */
    public function shareConfig(){
        $title = config("site.share_title");
        $sub_title = config("site.share_sub_title");
        $image = config("site.share_image");

        $data = [
            "title" => $title,
            "sub_title" => $sub_title,
            "image" => $image
        ];

        $this->success("请求成功", $data);
    }
}
